home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-08-27 | 644 b | 37 lines | [TEXT/PJMM] |
- unit MyMachineNames;
-
- interface
-
- const
- owner_id = -16096;
- machine_id = -16413;
-
- function GetOwnerName: str255;
- function GetMachineName: str255;
-
- implementation
-
- function GetName (id1, id2: integer): str255;
- var
- sh: stringHandle;
- begin
- sh := GetString(id1);
- if sh = nil then
- sh := GetString(id2);
- if sh <> nil then
- GetName := sh^^ { Don't release it, someone else may be using it }
- else
- GetName := 'unnamed';
- end;
-
- function GetOwnerName: str255;
- begin
- GetOwnerName := GetName(owner_id, machine_id);
- end;
-
- function GetMachineName: str255;
- begin
- GetMachineName := GetName(machine_id, owner_id);
- end;
-
- end.